package ru.passivemoney.root;

import com.dukascopy.api.IEngine;

public class EngineHolder {

	private static volatile IEngine engine = null;
	private static final Object lock = new Object();
	
	public static IEngine getEngine() {
		return engine;
	}

	public static void setEngine(IEngine engine) {
		if(getEngine() == null){
			synchronized(lock){
				if(getEngine() == null){
					EngineHolder.engine = engine;
				}
			}
		}
	}
}
